package com.dingreading.cloud.admin.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.RelationOneToOne;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
public class StaffRolesDto implements Serializable {

    private Long id;

    private String storeUid;

    private String staffUid;

    private String roles;

    private Integer enabled;

    private Integer isHeadquarterStaff;

    private Integer isStoreStaff;

    private Integer inStoreService;

    @RelationOneToOne(
            selfField = "storeUid",
            targetTable = "stores",
            targetField = "uid",
            valueField = "storeName"
    )
    private String storeName;

    private String roleName;

    private Integer roleNum;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date addTime;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date editTime;

    /**
     * 创建人uid
     */
    private String addStaffUid;

    /**
     * 创建人姓名
     */
    private String addStaffName;

    /**
     * 更新人uid
     */
    private String lastStaffUid;

    /**
     * 更新人姓名
     */
    private String lastStaffName;

}
